﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="BonjourHotel.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>BonjourHotel! - OpenSource Reservation System - v1.0a</title>
    <link rel="Stylesheet" type="text/css" href="/css/reset.css" />
    <link rel="Stylesheet" type="text/css" href="/css/style.css" />    
</head>
<body>
    <form id="form1" runat="server">

    <div id="Container">
    <h1>Bonjour Hotel!</h1>

    <div id="LoginBox">
        <asp:Login runat="server" ID="loginBox" OnLoginError="loginBox_LoginError">
            <LayoutTemplate>

                <p>
                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Nome utente:</asp:Label>
                <asp:TextBox CssClass="LoginInput" ID="UserName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                ControlToValidate="UserName" ErrorMessage="Il nome utente è obbligatorio." 
                ToolTip="Il nome utente è obbligatorio." ValidationGroup="loginBox">*</asp:RequiredFieldValidator>
                </p>
                
                <p>
                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                <asp:TextBox CssClass="LoginInput" ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                ControlToValidate="Password" ErrorMessage="La password è obbligatoria." 
                ToolTip="La password è obbligatoria." ValidationGroup="loginBox">*</asp:RequiredFieldValidator>
                </p>
                
                <asp:Panel runat="server" ID="pnlError" Visible="false" CssClass="ErrorBox">
                    <asp:Image runat="server" ID="imgError" ImageUrl="~/Css/Error.png" />
                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                </asp:Panel>
    
                <p>
                <asp:Button CssClass="Button" ID="LoginButton" runat="server" CommandName="Login" Text="Accedi" 
                ValidationGroup="loginBox" />
                </p>
            </LayoutTemplate>
        </asp:Login>
    </div>
    </div>
    </form>
</body>
</html>
